The present invention relates to an image processing apparatus and an image processing program for expressing optical reflection and refraction at an interface of media in a virtual space.
Graphic rendering using three dimensional virtual space is in general use in recent TV games.
However, it is difficult for image processing apparatuses used in the usual game machines to express an optical effect of the water surface in the virtual space during high speed rendering processing.
Image processing apparatuses including a special purpose hardware, such as, a “pixel shader,” are used in high-priced personal computers and game machines, in which a high performance image processing apparatus is incorporated, so the optical effect of the water surface can be expressed. It is difficult for low priced game machines to execute the same processing without the high-priced processors.
In the modeling of the conventional type, for usual image processing apparatuses (without special purpose hardware, such as, a pixel shader), it is necessary to execute image processing of a floating body at the water surface extending though two media, over and under the water, by separating one object into a partial object (model) over and under the water. The separated objects are independently processed.
For example, as shown in FIG. 18, in a case of an object OB extending over and under the water surface in a virtual space SP, a cut (separated) model OB1 (FIG. 18) of a portion over the water surface W shown by hatching, and a out (separated) model OB2 (FIG. 19) of a portion under the water surface W, are generated. The data of the cut models are independently managed and independently rendered by an image processing apparatus.
The cut (separated) model's generation is a big burden for computer graphics designers. The volume of data to be managed increases. The data volume to be processed in the virtual space, in the form of object data, increases when processed by the image processing apparatus. Therefore, there is a problem that the processing is complicated, and it becomes one cause of image processing delay called “process drop out”.
In the case that the above rendering method is used, cut (separated) models are prepared for the total patterns of various water levels, and various positions and angles of objects when the object is changed in rendering. The water level, and the position and angle of the object, cannot be changed in response to the game situation change.
It is an object of the present invention to solve the above mentioned conventional problems by expressing optical reflection and refraction at a media interface in a virtual space by utilizing processing of rather light load, without the use of any special purpose image processing apparatus.